package nl.grol.yakshop.domain.model;

import com.google.common.base.Objects;
import com.google.common.base.Preconditions;


public class CustomerOrder extends BaseOrder {
	

	public CustomerOrder(Integer forDay, String customerName, Double milkInLiters, Integer skins) {
		super( forDay, customerName, milkInLiters, skins, null );
		
		Preconditions.checkArgument(this.getCustomerName() != null);
		Preconditions.checkArgument(this.getMilkInLiters() != null);
		Preconditions.checkArgument(this.getSkins() != null);
		Preconditions.checkArgument(this.getReceiptDate() != null);

	}

	public String toString() {
		
		return Objects.toStringHelper(this)
	       .add("forDay", this.getForDay())
	       .add("receiptDate", this.getReceiptDate())
	       .add("customerName", this.getCustomerName())
	       .add("milkInLiters", this.getMilkInLiters())
	       .add("skins", this.getSkins())
	       .toString();
	}

}
